/*
 * This is openGL related class.
 * will render different shapes and 
 * effects to the screen
 */
#ifndef RAYTRACING_GLRENDER_H
#define RAYTRACING_GLRENDER_H

#include "ShaderSource.h"
#include "cpuTracer.h"
#include <vector>

class GLrender {
private:
    ShaderProgram sp;
    GLFWwindow * wwindow;
    // vertex array buffer object
    GLuint vao;
    // vertex buffer
    GLuint vbo;
    // element buffer object
    GLuint ebo;

    // Uniforms
    GLint uniView;
    GLint uniProj;
    GLint uniModel;

    vector<Object*> objects;

public:
    void initOpenGL();
    void addObject(Object *object);
    void update();
    void mainLoop();
};


#endif //RAYTRACING_GLRENDER_H
